package com.example.smartcity4.reteofi;

import com.example.smartcity4.javaBean.GsonBean;
import com.example.smartcity4.javaBean.MetroDalBean;
import com.google.gson.Gson;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface SmartService {
    @GET("/prod-api/api/rotation/list")
    Call<GsonBean> get_banner(@Query("type") String type);

    @GET("/prod-api/press/press/list")
    Call<GsonBean> get_hot(@Query("hot") String hot);

    @GET("/prod-api/api/service/list")
    Call<GsonBean> get_service();

    @GET("/prod-api/press/category/list")
    Call<GsonBean> get_cat();

    @GET("/prod-api/press/press/list")
    Call<GsonBean> get_list(@Query("type") String type);

    @POST("/prod-api/api/login")
    Call<GsonBean> post_login(@Body RequestBody body);

    @PUT("/prod-api/api/common/user/resetPwd")
    Call<GsonBean> put_password(@Body RequestBody body, @Header("Authorization") String token);

    @POST("/prod-api/api/common/feedback")
    Call<GsonBean>post_quest(@Body RequestBody body,@Header("Authorization") String token);

    @GET("/prod-api/api/metro/list")
    Call<GsonBean>get_metro(@Query("currentName") String currentName);

    @GET("/prod-api/api/metro/line/{id}")
    Call<MetroDalBean>get_line(@Path("id") int id);

    @GET("/prod-api/api/metro/city")
    Call<MetroDalBean>get_city();

    @POST("/prod-api/api/register")
    Call<GsonBean> post_logon(@Body RequestBody body);
}
